import { createRouter, createWebHistory } from 'vue-router'
import AdminLayout from '../layout/AdminLayout.vue'
import Home from '../views/Home.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      component: () => import('../views/ndemo/index.vue'),
    },
    {
      path: '/aiApp/:appSn',
      name: 'ai_app',
      component: () => import('../views/app/index.vue')
    },
    {
      path: '/aiApp-1/:appId',
      name: 'ai_app_1',
      component: () => import('../views/app/app-1.vue')
    },
    {
      path: '/jboltai',
      component: AdminLayout,
      children: [
        {
          path: '',
          name: 'home',
          component: Home
        },
        {
          path: 'system/users',
          name: 'users',
          component: () => import('../views/system/Users.vue')
        },
        {
          path: 'system/roles',
          name: 'roles',
          component: () => import('../views/system/Roles.vue')
        },
        {
          path: 'system/dict',
          name: 'dict',
          component: () => import('../views/system/Dict.vue')
        },
        {
          path: 'resources',
          name: 'aiResources',
          component: () => import('../views/ai_resource/index.vue')
        },
        {
          path: 'file',
          name: 'aiFile',
          component: () => import('../views/ai_file/index.vue')
        },
        {
          path: 'doc',
          name: 'aiDoc',
          component: () => import('../views/ai_doc/index.vue')
        },
        {
          path: 'knowledge_base',
          name: 'aiKnowledgeBase',
          component: () => import('../views/ai_knowledge_base/index.vue')
        },
        {
          path: 'app',
          name: 'app',
          component: () => import('../views/ai_app/index.vue')
        },
        {
          path: 'chat',
          name: 'chat',
          component: () => import('../views/chat/index.vue')
        },
        {
          path: 'function_call',
          name: 'function_call',
          component: () => import('../views/function_call/index.vue')
        },
        {
          path: 'vdb',
          name: 'vdb',
          component: () => import('../views/vdb/index.vue')
        },
        {
          path: 'file_extract',
          name: 'file_extract',
          component: () => import('../views/file_extract/index.vue')
        },
        {
          path: 'file_split',
          name: 'file_split',
          component: () => import('../views/file_split/index.vue')
        },
      ]
    },

  ]
})

export default router
